/**
 * Copyright 2000-2012 TrackMate
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package info.track_mate.send_email;

import java.util.Collection;

/**
 * Represents a class capable of sending electronic messages.
 * @author Gareth Smith <gareth@track-mate.info>
 */
public interface MessageSender {

  /**
   * Send an email to the specified addresses with the specified content.
   * @param recipientAddresses The addresses for the message to be addressed to.
   * @param ccAddresses The addresses for the message to be carbon-copied to.
   * @param bccAddresses The addresses for the message to be 'blind' carbon-copied to.
   * @param messageSubject The subject of the message.
   * @param messageBody The body of the message.
   * @throws Exception If the message couldn't be sent.
   */
  void sendMessage(Collection<String> recipientAddresses, Collection<String> ccAddresses, Collection<String> bccAddresses, String messageSubject,
      String messageBody, Collection<MessageAttachment> messageAttachments) throws Exception;

  void sendTemplatedMessage(Collection<TemplatedEmailRecipient> recipientAddresses, TemplatedMessage templatedMessage) throws Exception;
}
